package com.wpp.test;

import com.wpp.test.Clerk;
public class test {

    public static void main(String args[]) {
        Clerk clerk = new Clerk();

        Consumer c1 = new Consumer(clerk);
        Consumer c2 = new Consumer(clerk);
        Consumer c3 = new Consumer(clerk);

        Producer p1 = new Producer(clerk);

        c1.setName("消费者1----");
        c2.setName("消费者2----");
        c3.setName("消费者3----");

        p1.setName("生产者1====");

        c1.start();
        c2.start();
        c3.start();
        p1.start();
    }

}
